home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / ab20 / ab20_archive / utilities / printer / post-1.6src.lzh / postdata.c < prev    next >
C/C++ Source or Header  |  1991-04-17  |  7KB  |  322 lines

  1. /* PostScript interpreter file "postdata.c" - external data definitions */
  2. /* (C) Adrian Aylward 1989, 1991 */
  3.  
  4. # include "post.h"
  5.  
  6. /* Prompts */
  7.  
  8. int prompting = 0;
  9.  
  10. char prompt1[promptsize + 1], prompt2[promptsize + 1];
  11.  
  12. /* Times */
  13.  
  14. long time1, time2;
  15.  
  16. /* The random number */
  17.  
  18. unsigned int random;
  19.  
  20. /* The virtual machine */
  21.  
  22. int packing;
  23. int vmnest;
  24. int vmparms, vmsegno, vmsegsize;
  25. int vmused, vmhwm, vmmax;
  26.  
  27. char *vmbeg[vmsegmax];
  28. int vmnext[vmsegmax], vmsize[vmsegmax];
  29.  
  30. struct vmframe vmstack[vmstacksize + 1];
  31.  
  32. /* Dictionaries */
  33.  
  34. struct dictionary *systemdptr, *userdptr, *errordptr, *errdsdptr;
  35.  
  36. /* The name table */
  37.  
  38. char namebuf[namebufsize + 1];
  39.  
  40. vmref *nametable;
  41.  
  42. /* The stacks */
  43.  
  44. int opernest, execnest, dictnest;
  45.  
  46. struct object *operstack, *execstack, *dictstack;
  47.  
  48. /* The file table */
  49.  
  50. struct file *filetable;
  51.  
  52. /* Object types and flags */
  53.  
  54. char *typetable[typemax + 1] =
  55. {   "nulltype",
  56.     "marktype",
  57.     "savetype",
  58.     "operatortype",
  59.     "filetype",
  60.     "integertype",
  61.     "realtype",
  62.     "booleantype",
  63.     "arraytype",
  64.     "packedarraytype",
  65.     "stringtype",
  66.     "nametype",
  67.     "dicttype",
  68.     "fonttype"
  69. };
  70.  
  71. /* Errors */
  72.  
  73. char *errortable[errmax + 1] =
  74. {   "handleerror",
  75.     "dictfull",
  76.     "dictstackoverflow",
  77.     "dictstackunderflow",
  78.     "execstackoverflow",
  79.     "interrupt",
  80.     "invalidaccess",
  81.     "invalidexit",
  82.     "invalidfileaccess",
  83.     "invalidfont",
  84.     "invalidrestore",
  85.     "invalidstop",
  86.     "ioerror",
  87.     "limitcheck",
  88.     "nocurrentpoint",
  89.     "rangecheck",
  90.     "stackoverflow",
  91.     "stackunderflow",
  92.     "syntaxerror",
  93.     "timeout",
  94.     "typecheck",
  95.     "undefined",
  96.     "undefinedfilename",
  97.     "undefinedresult",
  98.     "unmatchedmark",
  99.     "unregistered",
  100.     "VMerror",
  101.     "memoryallocation",
  102.     "kill"
  103. };
  104.  
  105. struct object errorname[errmax + 1];
  106.  
  107. struct object errordict;
  108.  
  109. char *errdstable[edsmax] =
  110. {   "newerror",
  111.     "errorname",
  112.     "command",
  113.     "ostack",
  114.     "estack",
  115.     "dstack"
  116. };
  117.  
  118. struct object errdsname[edsmax], errdstoken[edsmax];
  119.  
  120. struct object errdsdict;
  121.  
  122. int errorflag, errornum;
  123. char *errorstring;
  124.  
  125. int returncode;
  126.  
  127. int intsigflag;
  128.  
  129. /* The operator table */
  130.  
  131. struct object *currtoken;
  132.  
  133. int opnum;
  134. struct operator *optable;
  135.  
  136. /* Various names for character operations */
  137.  
  138. char *chartable[charmax] =
  139. {   "StandardEncoding",
  140.     ".notdef",
  141.     "FontDirectory",
  142.     "FontType",
  143.     "FontMatrix",
  144.     "FontBBox",
  145.     "Encoding",
  146.     "FID",
  147.     "UniqueID",
  148.     "BuildChar",
  149.     "Metrics",
  150.     "PaintType",
  151.     "StrokeWidth",
  152.     "CharStrings",
  153.     "Private",
  154.     "Subrs",
  155.     "lenIV",
  156.     "BlueValues",
  157.     "OtherBlues",
  158.     "BlueScale",
  159.     "BlueShift",
  160.     "BlueFuzz"
  161. };
  162.  
  163. struct object charname[charmax];
  164.  
  165. /* The standard encoding vector */
  166.  
  167. char *stdentable[192] =
  168. { "space",         "exclam",        "quotedbl",      "numbersign", /* 20 */
  169.   "dollar",        "percent",       "ampersand",     "quoteright",
  170.   "parenleft",     "parenright",    "asterisk",      "plus",
  171.   "comma",         "hyphen",        "period",        "slash",
  172.   "zero",          "one",           "two",           "three",      /* 30 */
  173.   "four",          "five",          "six",           "seven",
  174.   "eight",         "nine",          "colon",         "semicolon",
  175.   "less",          "equal",         "greater",       "question",
  176.   "at",            "A",             "B",             "C",          /* 40 */
  177.   "D",             "E",             "F",             "G",
  178.   "H",             "I",             "J",             "K",
  179.   "L",             "M",             "N",             "O",
  180.   "P",             "Q",             "R",             "S",          /* 50 */
  181.   "T",             "U",             "V",             "W",
  182.   "X",             "Y",             "Z",             "bracketleft",
  183.   "backslash",     "bracketright",  "asciicircum",   "underscore",
  184.   "quoteleft",     "a",             "b",             "c",          /* 60 */
  185.   "d",             "e",             "f",             "g",
  186.   "h",             "i",             "j",             "k",
  187.   "l",             "m",             "n",             "o",
  188.   "p",             "q",             "r",             "s",          /* 70 */
  189.   "t",             "u",             "v",             "w",
  190.   "x",             "y",             "z",             "braceleft",
  191.   "bar",           "braceright",    "asciitilde",    0,
  192.   0,               "exclamdown",    "cent",          "sterling",   /* A0 */
  193.   "fraction",      "yen",           "florin",        "section",
  194.   "currency",      "quotesingle",   "quotedblleft",  "guillemotleft",
  195.   "guilsinglleft", "guilsinglright","fi",            "fl",
  196.   0,               "endash",        "dagger",        "daggerdbl",  /* B0 */
  197.   "periodcentered",0,               "paragraph",     "bullet",
  198.   "quotesinglbase","quotedblbase",  "quotedblright", "guillemotright",
  199.   "ellipsis",      "perthousand",   0,               "questiondown",
  200.   0,               "grave",         "acute",         "circumflex", /* C0 */
  201.   "tilde",         "macron",        "breve",         "dotaccent",
  202.   "dieresis",      0,               "ring",          "cedilla",
  203.   0,               "hungarumlaut",  "ogonek",        "caron",
  204.   "emdash",        0,               0,               0,            /* D0 */
  205.   0,               0,               0,               0,
  206.   0,               0,               0,               0,
  207.   0,               0,               0,               0,
  208.   0,               "AE",            0,               "ordfeminine",/* E0 */
  209.   0,               0,               0,               0,
  210.   "Lslash",        "Oslash",        "OE",            "ordmasculine",
  211.   0,               0,               0,               0,
  212.   0,               "ae",            0,               0,            /* F0 */
  213.   0,               "dotlessi",      0,               0,
  214.   "lslash",        "oslash",        "oe",            "germandbls",
  215.   0,               0,               0,               0
  216. };
  217.  
  218. struct object *stdencoding;
  219.  
  220. /* Paths, lines, and line segments */
  221.  
  222. int pathsize;
  223. int pathbeg, pathend, pathseg;
  224.  
  225. struct point *patharray;
  226.  
  227. int linesize;
  228. int lineend;
  229.  
  230. struct line *linearray;
  231. struct line **lineptr;
  232.  
  233. struct lineseg *linesegarray;
  234.  
  235. int clipsize;
  236. int clipend;
  237.  
  238. struct clip *cliparray;
  239. struct clip **clipptr;
  240.  
  241. /* The halftone screen */
  242.  
  243. int halfok;
  244.  
  245. char *halfbeg;
  246. int halfsize;
  247.  
  248. struct halftone halftone[4];
  249.  
  250. int screenok;
  251.  
  252. struct halfscreen halfscreen[4];
  253.  
  254. /* The page buffer and output device */
  255.  
  256. struct device page;
  257.  
  258. /* The x buffers, y bucket array, and line filling limits */
  259.  
  260. int xbsize;
  261. int *xshf;
  262. char *xbuf;
  263.  
  264. int ybflag;
  265. struct line **ybucket;
  266.  
  267. double ylwb, yupb;
  268. double ymin, ymax;
  269.  
  270. /* The graphics state */
  271.  
  272. int gnest;
  273.  
  274. struct gstate gstate, *gstack;
  275.  
  276. struct object copies;
  277.  
  278. /* The interpreter recursion stack */
  279.  
  280. int inest;
  281.  
  282. struct istate istate, *istack;
  283.  
  284. /* The font directory and make cache */
  285.  
  286. struct object fontdir;
  287.  
  288. int fonttype, fontid, fontencodlen;
  289. vmref fontmatrix, fontencoding;
  290.  
  291. struct fmrec *fmcache;
  292.  
  293. int fmcount;
  294.  
  295. /* The font character cache */
  296.  
  297. struct fcrec **fccache;
  298.  
  299. struct fcrec *fcbeg, *fcend, *fcptr;
  300.  
  301. int fclen, fclimit;
  302.  
  303. /* Font build data for type 1 */
  304.  
  305. int fontpainttype;
  306. float fontstrokewidth;
  307. vmref fontmetrics, fontcharstrings, fontprivate;
  308. struct object fontbuildproc, fontsubrs;
  309. int fontleniv;
  310.  
  311. /* Allocated memory */
  312.  
  313. void *memfbeg, *memhbeg;
  314. void *memlbeg, *mempbeg, *memibeg, *memxbeg, *memybeg;
  315.  
  316. int   memflen,  memhlen;
  317. int   memllen,  memplen,  memilen,  memxlen,  memylen;
  318.  
  319. int   memvmin,  memlmin,  mempmin;
  320.  
  321. /* End of file "postdata.c" */
  322.